<template>
  <view>
    <view class="header status_bar">
      <view class="back iconfont" @tap="backPage">&#xe779;</view>
      <view class="text">{{pageTitle}}</view>
    </view>
    <view class="clear_box"></view>

    <view class="content_box">
      <rich-text class="fwb" :nodes="strings"></rich-text>

    </view>

  </view>
</template>

<script>
export default {
  data() {
    return {
      strings: '',
			type:'',
			pageTitle:'',
    };
  },
  onLoad(options) {
    let that = this;
		that.type = options.type;
		if(that.type == 8){
			that.pageTitle = '《用户协议和隐私政策》'
		}else if(that.type == 11){
			that.pageTitle = '《平台注册协议》'
		}else if(that.type == 7){
			that.pageTitle = '《会员服务协议》'
		}
    that.loadData();
  },
  methods: {
    backPage() {
      uni.navigateBack({});
    },
    gotopage(e) {
      let url = e.currentTarget.dataset.url;
      uni.navigateTo({
        url: url
      });
    },
    loadData() {
      let that = this;
      that.Net._get('help_detail',{id:that.type}, res => {
        if(res.code == 200){
          let editSplitStr = '##qingwuit##'
          let content = res.data.content;
          content = content.split(editSplitStr)
          that.strings = content[0];
        }
      });
    },
  }
};
</script>

<style>

.content_box{
	width: 92%;
	margin: auto;
	font-size: 3.5vw;
	line-height: 6vw;
}

.content_box .fwb{
	width: 92%;
	margin: auto;
}
</style>
